<template>
  <div>
    <el-table :data="value" border fit highlight-current-row>
      <el-table-column label="ID" prop="serialNumber" width="50px"></el-table-column>
      <el-table-column label="Date" prop="date" width="150px"></el-table-column>
      <el-table-column label="Title">
        <template slot-scope="{row}">
          {{row.title}}
          <el-tag type="primary">{{row.country}}</el-tag>
        </template>
      </el-table-column>
      <el-table-column label="Author" prop="author" width="100px"></el-table-column>
      <el-table-column label="Importance" width="150px">
        <template slot-scope="{row}">
          <i class="el-icon-star-on star" v-for="(item, index) in row.importance" :key="index"></i>
        </template>
      </el-table-column>
      <el-table-column label="Readings" prop="readings" width="100px"></el-table-column>
      <el-table-column label="Status" width="100px">
        <template slot-scope="{row}">
          <el-tag v-if="row.status !== 1" type="success" size="mini">published</el-tag>
          <el-tag v-else type="info" size="mini">draft</el-tag>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  props: ['value']
}
</script>

<style>
</style>
